using Engine;
using Game;
using GameEntitySystem;

namespace SCIENEW {
    public class KibblerDevice : FourDirectionalDevice, ICrafterDevice<ComponentKibbler>, IElectricElementDevice {
        public KibblerDevice() : base("KibblerDevice", 105, upSlot: 208, sideSlot: 103, rotate: true) {
        }
        public string GetEntityName(int value) => "Kibbler";
        public Widget GetWidget(IInventory inventory, ComponentKibbler component) => new KibblerWidget(inventory, component);
        public override DeviceBehavior[] GetBehaviors(Project project) => [new KibblerDeviceBehavior(project)];

        public ElectricElement CreateElectricElement(SubsystemElectricity subsystemElectricity, int value, int x, int y, int z) => new CrafterPopResultsElectricElement(subsystemElectricity, new Point3(x, y, z), GetDirection(value));

        public ElectricConnectorType? GetConnectorType(SubsystemTerrain terrain, int value, int face, int connectorFace, int x, int y, int z) => ElectricConnectorType.Input;

        public int GetConnectionMask(int value) => int.MaxValue;
    }
}